package ilearn.seata.job.java8.order.controller;

import ilearn.seata.job.java8.order.entity.Order;
import ilearn.seata.job.java8.order.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/add")
    public Order add(String goods, String accId, String name, BigDecimal amt){
        return orderService.add(accId,goods,name,amt);
    }
}
